<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.14.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>PID_Study: E:/STM32CubeIDEWorkspace/noRTOS/PID_Study/Drivers/BSP/Inc/u8g2_stm32_hw_iic.h 文件参考</title>
<link rel="icon" href="Doxygen-55px.png" type="image/x-icon" />
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="Doxygen-55px.png"/></td>
  <td id="projectalign">
   <div id="projectname">PID_Study<span id="projectnumber">&#160;v1.0.0</span>
   </div>
   <div id="projectbrief">doc for PID_Study</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.14.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search/",'.html');
</script>
<script type="text/javascript">
$(function() { codefold.init(); });
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a href="dir_0c97d201d54b8b5817233953fc3aadb6.html">STM32CubeIDEWorkspace</a></li><li class="navelem"><a href="dir_f3310f12da31771255acec658cd4246d.html">noRTOS</a></li><li class="navelem"><a href="dir_8022218a35d1971722714ae72b00e870.html">PID_Study</a></li><li class="navelem"><a href="dir_17bc370c857333bc4166d76f67bb735c.html">Drivers</a></li><li class="navelem"><a href="dir_b62ba9d628590829d5c152676ba50098.html">BSP</a></li><li class="navelem"><a href="dir_a3931c23c62a4333dd07fbd46d82639c.html">Inc</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a> &#124;
<a href="#func-members">函数</a>  </div>
  <div class="headertitle"><div class="title">u8g2_stm32_hw_iic.h 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p>STM32硬件I2C驱动u8g2 OLED显示屏接口头文件  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;main.h&quot;</code><br />
<code>#include &quot;u8g2.h&quot;</code><br />
</div>
<p><a href="u8g2__stm32__hw__iic_8h_source.html">浏览该文件的源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-define-members" class="groupheader"><a id="define-members" name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:af3b86d961da0a3575b4f99c9ffaf01fd" id="r_af3b86d961da0a3575b4f99c9ffaf01fd"><td class="memItemLeft" align="right" valign="top"><a id="af3b86d961da0a3575b4f99c9ffaf01fd" name="af3b86d961da0a3575b4f99c9ffaf01fd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>u8</b>&#160;&#160;&#160;unsigned char</td></tr>
<tr class="memdesc:af3b86d961da0a3575b4f99c9ffaf01fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">unsigned char类型别名 <br /></td></tr>
<tr class="memitem:aabf4f709c8199e41cf279c77112345fe" id="r_aabf4f709c8199e41cf279c77112345fe"><td class="memItemLeft" align="right" valign="top"><a id="aabf4f709c8199e41cf279c77112345fe" name="aabf4f709c8199e41cf279c77112345fe"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>MAX_LEN</b>&#160;&#160;&#160;128</td></tr>
<tr class="memdesc:aabf4f709c8199e41cf279c77112345fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">OLED缓冲区最大长度 <br /></td></tr>
<tr class="memitem:a5751031b78e50f8d0fe4a34441717b9a" id="r_a5751031b78e50f8d0fe4a34441717b9a"><td class="memItemLeft" align="right" valign="top"><a id="a5751031b78e50f8d0fe4a34441717b9a" name="a5751031b78e50f8d0fe4a34441717b9a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>OLED_ADDRESS</b>&#160;&#160;&#160;0x78</td></tr>
<tr class="memdesc:a5751031b78e50f8d0fe4a34441717b9a"><td class="mdescLeft">&#160;</td><td class="mdescRight">OLED设备I2C地址 <br /></td></tr>
<tr class="memitem:a6202de0afc10764d94a0333eaa0b87a1" id="r_a6202de0afc10764d94a0333eaa0b87a1"><td class="memItemLeft" align="right" valign="top"><a id="a6202de0afc10764d94a0333eaa0b87a1" name="a6202de0afc10764d94a0333eaa0b87a1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>OLED_CMD</b>&#160;&#160;&#160;0x00</td></tr>
<tr class="memdesc:a6202de0afc10764d94a0333eaa0b87a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">OLED命令标志 <br /></td></tr>
<tr class="memitem:a93e8917859fa2ae044f01ceb96797c95" id="r_a93e8917859fa2ae044f01ceb96797c95"><td class="memItemLeft" align="right" valign="top"><a id="a93e8917859fa2ae044f01ceb96797c95" name="a93e8917859fa2ae044f01ceb96797c95"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><b>OLED_DATA</b>&#160;&#160;&#160;0x40</td></tr>
<tr class="memdesc:a93e8917859fa2ae044f01ceb96797c95"><td class="mdescLeft">&#160;</td><td class="mdescRight">OLED数据标志 <br /></td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 id="header-func-members" class="groupheader"><a id="func-members" name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a48019023a62c9c8b760ec57e433e1e7e" id="r_a48019023a62c9c8b760ec57e433e1e7e"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a48019023a62c9c8b760ec57e433e1e7e">u8x8_byte_hw_i2c</a> (u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)</td></tr>
<tr class="memdesc:a48019023a62c9c8b760ec57e433e1e7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">STM32硬件I2C方式u8g2字节传输函数  <br /></td></tr>
<tr class="memitem:a458b1587219ea54dccc399370a0e9813" id="r_a458b1587219ea54dccc399370a0e9813"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a458b1587219ea54dccc399370a0e9813">u8x8_gpio_and_delay</a> (u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)</td></tr>
<tr class="memdesc:a458b1587219ea54dccc399370a0e9813"><td class="mdescLeft">&#160;</td><td class="mdescRight">u8g2 GPIO及延时处理函数  <br /></td></tr>
<tr class="memitem:a318791e972320797c54a3f932090e005" id="r_a318791e972320797c54a3f932090e005"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a318791e972320797c54a3f932090e005">u8g2Init</a> (u8g2_t *u8g2)</td></tr>
<tr class="memdesc:a318791e972320797c54a3f932090e005"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化u8g2 OLED显示屏  <br /></td></tr>
<tr class="memitem:acb0416b133509d0e873e1dc332561edf" id="r_acb0416b133509d0e873e1dc332561edf"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#acb0416b133509d0e873e1dc332561edf">draw</a> (u8g2_t *u8g2)</td></tr>
<tr class="memdesc:acb0416b133509d0e873e1dc332561edf"><td class="mdescLeft">&#160;</td><td class="mdescRight">OLED显示屏绘图函数  <br /></td></tr>
<tr class="memitem:a244b0a54daedf8f7297b974fb2e87309" id="r_a244b0a54daedf8f7297b974fb2e87309"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a244b0a54daedf8f7297b974fb2e87309">testDrawPixelToFillScreen</a> (u8g2_t *u8g2)</td></tr>
<tr class="memdesc:a244b0a54daedf8f7297b974fb2e87309"><td class="mdescLeft">&#160;</td><td class="mdescRight">测试函数：绘制像素填满整个屏幕  <br /></td></tr>
</table>
<a name="details" id="details"></a><h2 id="header-details" class="groupheader">详细描述</h2>
<div class="textblock"><p>STM32硬件I2C驱动u8g2 OLED显示屏接口头文件 </p>
<dl class="section author"><dt>作者</dt><dd>废话文学创始人 </dd></dl>
<dl class="section version"><dt>版本</dt><dd>1.0 </dd></dl>
<dl class="section date"><dt>日期</dt><dd>2024-02-25 </dd></dl>
</div><a name="doc-func-members" id="doc-func-members"></a><h2 id="header-doc-func-members" class="groupheader">函数说明</h2>
<a id="acb0416b133509d0e873e1dc332561edf" name="acb0416b133509d0e873e1dc332561edf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb0416b133509d0e873e1dc332561edf">&#9670;&#160;</a></span>draw()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void draw </td>
          <td>(</td>
          <td class="paramtype">u8g2_t *</td>          <td class="paramname"><span class="paramname"><em>u8g2</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>OLED显示屏绘图函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">u8g2</td><td>u8g2结构体指针 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a244b0a54daedf8f7297b974fb2e87309" name="a244b0a54daedf8f7297b974fb2e87309"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a244b0a54daedf8f7297b974fb2e87309">&#9670;&#160;</a></span>testDrawPixelToFillScreen()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void testDrawPixelToFillScreen </td>
          <td>(</td>
          <td class="paramtype">u8g2_t *</td>          <td class="paramname"><span class="paramname"><em>u8g2</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>测试函数：绘制像素填满整个屏幕 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">u8g2</td><td>u8g2结构体指针 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a318791e972320797c54a3f932090e005" name="a318791e972320797c54a3f932090e005"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a318791e972320797c54a3f932090e005">&#9670;&#160;</a></span>u8g2Init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void u8g2Init </td>
          <td>(</td>
          <td class="paramtype">u8g2_t *</td>          <td class="paramname"><span class="paramname"><em>u8g2</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>初始化u8g2 OLED显示屏 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">u8g2</td><td>u8g2结构体指针 </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a48019023a62c9c8b760ec57e433e1e7e" name="a48019023a62c9c8b760ec57e433e1e7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48019023a62c9c8b760ec57e433e1e7e">&#9670;&#160;</a></span>u8x8_byte_hw_i2c()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t u8x8_byte_hw_i2c </td>
          <td>(</td>
          <td class="paramtype">u8x8_t *</td>          <td class="paramname"><span class="paramname"><em>u8x8</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t</td>          <td class="paramname"><span class="paramname"><em>msg</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t</td>          <td class="paramname"><span class="paramname"><em>arg_int</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *</td>          <td class="paramname"><span class="paramname"><em>arg_ptr</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>STM32硬件I2C方式u8g2字节传输函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">u8x8</td><td>u8x8结构体指针 </td></tr>
    <tr><td class="paramname">msg</td><td>消息类型 </td></tr>
    <tr><td class="paramname">arg_int</td><td>整型参数 </td></tr>
    <tr><td class="paramname">arg_ptr</td><td>指针参数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>操作结果</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">u8x8</td><td>u8x8结构体指针 </td></tr>
    <tr><td class="paramname">msg</td><td>消息类型 </td></tr>
    <tr><td class="paramname">arg_int</td><td>整型参数 </td></tr>
    <tr><td class="paramname">arg_ptr</td><td>指针参数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>操作结果，1为成功，0为失败 </dd></dl>

</div>
</div>
<a id="a458b1587219ea54dccc399370a0e9813" name="a458b1587219ea54dccc399370a0e9813"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a458b1587219ea54dccc399370a0e9813">&#9670;&#160;</a></span>u8x8_gpio_and_delay()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint8_t u8x8_gpio_and_delay </td>
          <td>(</td>
          <td class="paramtype">u8x8_t *</td>          <td class="paramname"><span class="paramname"><em>u8x8</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t</td>          <td class="paramname"><span class="paramname"><em>msg</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t</td>          <td class="paramname"><span class="paramname"><em>arg_int</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *</td>          <td class="paramname"><span class="paramname"><em>arg_ptr</em></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>u8g2 GPIO及延时处理函数 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">u8x8</td><td>u8x8结构体指针 </td></tr>
    <tr><td class="paramname">msg</td><td>消息类型 </td></tr>
    <tr><td class="paramname">arg_int</td><td>整型参数 </td></tr>
    <tr><td class="paramname">arg_ptr</td><td>指针参数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>操作结果</dd></dl>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">u8x8</td><td>u8x8结构体指针 </td></tr>
    <tr><td class="paramname">msg</td><td>消息类型 </td></tr>
    <tr><td class="paramname">arg_int</td><td>整型参数 </td></tr>
    <tr><td class="paramname">arg_ptr</td><td>指针参数 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>操作结果，1为成功 </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.14.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
